#ifndef THREADOBJECT_H
#define THREADOBJECT_H

#include <QObject>
#include <QMutex>
#ifdef Q_OS_WIN32
#include "KeyLaunch.h"
#endif

class DesignModel;

class ThreadObject : public QObject
{
    Q_OBJECT
public:
    ThreadObject(DesignModel *model);
    ~ThreadObject();
    void stop();

public slots:
    void runKeyLaunchWork();

public slots:
    void emitsig()
    {
        emit sig();
    }
signals:
    void sig();
    void finished();

private:
    DesignModel *m_model;
    bool m_isStop;
    QMutex m_stopMutex;
};

int getKeyformStr(QString keyString);

#endif // THREADOBJECT_H
